#ifndef _LOCK_HPP_
#define _LOCK_HPP_

#include "noncopyable.hpp"
#include "base.hpp"

namespace thread
{
	class Lock : public NonCopyable
	{
		public :
			friend class Condition;
		public :
			Lock();
			~Lock();

			void lock();
			void unlock();
			bool lock(long ms);
			bool try_lock();

		private :
			pthread_mutex_t _mutex;
	};
};

#endif

